package com.kotlinvben.repository

import com.kotlinvben.entity.Department
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.JpaSpecificationExecutor
import org.springframework.stereotype.Repository

/**
 * @author wxluo2
 * @date 2025/5/24 23:05
 */
@Repository
interface DepartmentRepository : JpaRepository<Department, Long>, JpaSpecificationExecutor<Department> {
    fun existsByName(name: String): Boolean
    fun findByPidIsNull(): List<Department>
    fun findByPid(pid: Long): List<Department>
}